POV-Ray : Newsgroups : povray.tools.general : symbol table overflow : Re: symbol table overflow Server Time
19 May 2024 09:36:56 EDT (-0400)
  Re: symbol table overflow  
From: Warp
Date: 20 Apr 2004 04:42:35
Message: <4084e27b@news.povray.org>
Recursive function calls are a burden in practically all programming
languages because they have quite a lot of overhead (the exception
being the tail recursion optimization in some languages when the
recursive call is made properly). Recursion is usually also considerably
slower than doing it iteratively.

  While it's proven that certain algorithms can only be done recursively
(ie. using a recursion stack) and cannot be done iteratively, you should
still try.
  If you need a stack, then you'll have to use an array. The problem is,
of course, that arrays are fixed in size (ok, you can increase the
size of an array by creating a bigger array and copying the contents
of the old one to the new one, but that's some overhead as well).

-- 
plane{-x+y,-1pigment{bozo color_map{[0rgb x][1rgb x+y]}turbulence 1}}
sphere{0,2pigment{rgbt 1}interior{media{emission 1density{spherical
density_map{[0rgb 0][.5rgb<1,.5>][1rgb 1]}turbulence.9}}}scale
<1,1,3>hollow}text{ttf"timrom""Warp".1,0translate<-1,-.1,2>}//  - Warp -


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.